package us.gaaoc.framework.dao;

import java.math.BigInteger;
import java.util.Date;
import java.util.List;

import javax.faces.context.FacesContext;

import org.apache.log4j.Logger;
import org.hibernate.FetchMode;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.Query;
import org.hibernate.criterion.Restrictions;

import us.gaaoc.framework.model.Person;
import us.gaaoc.framework.model.SignatureImage;

public class SignatureImageDAOHibernate extends GenericHibernateDAO<SignatureImage, String, SignatureImageDAO> implements SignatureImageDAO {

	private static final Logger LOG = Logger.getLogger(SignatureImageDAOHibernate.class);
	
	protected SignatureImageDAOHibernate() {}
	
	public SignatureImage findImageByUuid (String uuid){			
		Query q = getSession().createQuery("from SignatureImage sm where sm.personUuid = ?");
		q.setString(0, uuid);
		return (SignatureImage)q.uniqueResult();
		
	}
	
}
